<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        body {
            font-size: 16px;
        }
        body>div:nth-of-type(2n+1) {
            width: 400px;
            height: 20px;
            border: 10px solid #00ff00;
        }
        .boxleft {
            margin: 50px;
            border: 20px solid red;
        }
    </style>
</head>
<body>
    <!-- 内联元素使用盒模型左右的margin正常显示，上下的不显示 -->
    <div class="boxttop">上盒子</div>
    <div class="boxt">
        <span class="boxleft">左文本</span>
        <span class="boxright">右文本</span>
    </div>
    <div class="boxbottom">下盒子</div>
</body>
</html>